<?php
/**
 * Created by PhpStorm.
 * User: yihua
 * Date: 2017/4/12
 * Time: 0:54
 */

namespace app\home\controller;


use app\home\model\page\setting\AddUser;
use app\home\model\page\setting\UserList;
use think\Controller;
use think\Request;

class Setting extends Controller
{
    private $param;

    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $this->param = Request::instance()->param();
    }

    public function addUser()
    {
        $obj = new AddUser();
        $ret = $obj->excute($this->param);
        return JSON($ret);
    }

    public function UserList(){
        $obj = new UserList();
        $ret = $obj->excute($this->param);
        //return JSON($ret);
        $this->assign('data',$ret['data']);
        return $this->fetch('home/pages/setting/userlist');
    }

}